#ifndef SOCKET_H
#define SOCKET_H

#include "SocketMessage.h"

class Socket
{
public:
	Socket();
	Socket(const TCPsocket& s);
	virtual ~Socket();

	//bool AddSocket(const Socket& socket);
	TCPsocket& GetSocket();

	bool Send(const SocketMessage& sm);
	bool Receive(SocketMessage* sm);

	bool Close();
	bool HasData();
	bool IsOpen();
protected:
	TCPsocket m_socket;
	SDLNet_SocketSet m_socketSet;
	IPaddress m_ip;
};

#endif //SOCKET_H